/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.common.web.control;

import android.app.Activity;
import android.content.IntentFilter;
import com.qihoo.gamecenter.sdk.common.web.view.NotOpenView;

public class a {
    private Activity a;
    private IntentFilter b;
    private NetApnChangeReceiver c;
    private NotOpenView d;

    public a(NotOpenView paramNotOpenView) {
        this.d = paramNotOpenView;
    }

    public void a(Activity paramActivity) {
        if (paramActivity == null)
            return;
        this.a = paramActivity;
        if (this.c != null)
            a();
        this.c = new NetApnChangeReceiver(paramActivity, this);
        this.b = new IntentFilter();
        this.b.addAction("android.net.conn.CONNECTIVITY_CHANGE");
        paramActivity.registerReceiver(this.c, this.b);
    }

    public void a() {
        if ((this.c == null) || (this.a == null))
            return;
        this.a.unregisterReceiver(this.c);
        this.c = null;
    }

    public void b() {
        if ((this.d == null) || (this.d.getVisibility() != 0))
            return;
        this.d.a();
    }
}